/* 
 * File:   ESGame.h
 * Author: Semidán Acosta Betancor
 *
 * Created on 17 de septiembre de 2011, 22:41
 */

#ifndef ESGAME_H
#define	ESGAME_H

#include <vector>
#include <SFML/Graphics.hpp>

namespace ee
{

class ESGameState;

class ESGame
{
public:
    ESGame(int width, int height, std::string &title);
    virtual ~ESGame();

    void handleEvents();
    void update();
    void draw();
    void display();

    void init();
    void cleanup();

    void addGameState(ESGameState *gameState);
    void changeState(ESGameState *gameState);
    
    bool isRunning() { return running; } //Implicit inline member

private:
    void cleanGameStates();


private:
    sf::RenderWindow renderWindow;

    std::vector<ESGameState*> gameStates;
    
    bool running;
};
}

#endif	/* ESGAME_H */

